import { defineStore } from 'pinia'


export const useEventStore = defineStore('event', {
    state: () => ({
        clickEvent: null, // 存储点击事件的数据
        hoverEvent: null, // 存储悬停事件的数据
    }),
    actions: {
        triggerClick(componentId: any) {
            this.clickEvent = componentId
        },
        // 触发悬停事件
        triggerHover(componentId: any) {
            this.hoverEvent = componentId
        },
    },
})